<?php
/**
 * @copyright Copyright (c) 2022 勾股工作室
 * @license https://opensource.org/licenses/GPL-3.0
 * @link https://www.gougucms.com
 */
declare (strict_types = 1);
namespace app\bitjob\controller;

use app\api\BaseController;
use app\bitjob\model\Bitjob;
use app\license\model\License;
use think\facade\Db;
use think\facade\View;

class Api extends BaseController
{public function index()
{
    if (request()->isAjax()) {
        $param = get_params();
        $where = array();
        $whereOr = array();
        if (!empty($param['keywords'])) {
            $where[] = ['a.salesman_name|a.salesman_mobile|a.id_card', 'like', '%' . $param['keywords'] . '%'];
        }

        $where[] = ['a.delete_time', '=', 0];


        $model = new Bitjob();
        $list = $model->get_list($param, $where, $whereOr);
        return table_assign(0, '', $list);
    } else {

        return view();
    }
}

}
